In a motor using a permanent magnet, a temperature of the permanent magnet of a rotor is raised by heat generated from windings and a core of a stator. As a result, a magnetic flux density remaining in the permanent magnet is reduced so that torque is lowered. Therefore, there is proposed a method of estimating a temperature of the permanent magnet and supplying a compensation current for compensating for the lowered torque based on the estimated temperature so as to stabilize an output (see, for example, Patent Literature 1).
However, when the compensation current is supplied, the compensation current causes an increase in amount of heat generated from the windings and the core of the stator so that the temperature of the permanent magnet is also raised. Further, if the permanent magnet is a high-temperature demagnetization magnet, when the permanent magnet is exposed to a high temperature that is equal to or higher than an operable operating temperature thereof, a coercive force is decreased, resulting in irreversible demagnetization. Therefore, it is necessary to limit a torque command so as to protect the permanent magnet when the estimated temperature of the permanent magnet becomes close to a maximum operable operating temperature.
In addition, in order to protect the permanent magnet, it is necessary to correctly estimate a temperature of the permanent magnet. In a related-art control device for a motor, a relationship among an induced voltage, a rotating speed (the number of rotations), and a temperature of a permanent magnet of a motor is determined as a map in advance. Further, in an actual operation, in a state where the motor is not supplied with power and is idling due to an external force related to an internal-combustion engine, the induced voltage and the rotating speed are detected based on outputs of a voltage sensor and a magnetic pole sensor. Then, using the detected induced voltage and rotating speed, the temperature of the permanent magnet is estimated by referring to the map determined in advance (see, for example, Patent Literature 2).